package com.aaa.controller;


import com.aaa.entity.CheckTeacher;
import com.aaa.entity.EduTeacher;
import com.aaa.vo.TbCheckTeacherVo;
import com.aaa.service.TbCheckTeacherService;

import com.eig.common.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 李双奇
 * @Date: 2022/12/13/20:10
 * @Description:
 */
@RestController
@RequestMapping("/core/teacher")
@Api(tags = "讲师审核")
public class TbCheckTeacherController {
    @Autowired
    private TbCheckTeacherService tbCheckTeacherService;


    @ApiOperation(value = "查询审核讲师")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页显示的条数")
    })
    @PostMapping("/findCheckTeacher/{current}/{pageSize}")
    public Result findCheckTeacher(@RequestBody TbCheckTeacherVo tbCheckTeacherVo,
                                   @PathVariable Integer current,
                                   @PathVariable Integer pageSize){
        return tbCheckTeacherService.findCheckTeacherByPage(tbCheckTeacherVo,current,pageSize);
    }

    /**
     * 修改审核信息
     * @param eduTeacher
     * @return
     */
    @PostMapping("/updateTeacherCheck")
    public Result updateTeacherCheck(@RequestBody EduTeacher eduTeacher){

        return tbCheckTeacherService.updataCheckTeacher(eduTeacher);
    }

    /**
     * 修改状态
     * @param eduTeacher
     * @return
     */
    @PostMapping("/updataStatus")
    private Result updataStatus(@RequestBody EduTeacher eduTeacher){
        return tbCheckTeacherService.updataStatus(eduTeacher);
    }

    /**
     * 修改审核
     * @param
     * @return
     */
    @PostMapping("/changeTeacherCheck")
    private Result updataStatus(@RequestBody CheckTeacher checkTeacher){
        return tbCheckTeacherService.updataTeacherCheckStatus(checkTeacher);
    }
}
